import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children:[
      {
        path: 'index',
        name:'index',
        component: () => import('../views/Index.vue')
      },
      {
        path: 'me',
        name:'me',
        component: () => import('../views/Me.vue')
      }
    ]
  },
  {
    path: '/swipe',
    name: 'swipe',
    component: () => import('../testing/Swipe.vue')
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('../views/About.vue')
  },
  {
    path: '/header',
    name: 'header',
    component: () => import('../testing/Header.vue')
  },
  {
    path: '/field',
    name: 'field',
    component: () => import('../testing/Field.vue')
  },
  {
    path: '/navbar',
    name: 'Navbar',
    component: () => import('../testing/Navbar.vue')
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/Register.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
